package com.gotloop.dto;

import java.io.Serializable;
import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;

import com.gotloop.enu.Role;

/**
 * UserDTO is a gotLoop registered user that can post and comment loops.
 * It is linked to an appengine User.
 * @author jibhaine
 *
 */
@XmlRootElement
public class UserDTO extends AbstractDTO implements Serializable {

	/**
	 * Generated serial version UID.
	 */
	private static final long serialVersionUID = -8452339522916381415L;

	/**
	 * Language of this User.
	 */
	private String lang;
	
	/**
	 * User name.
	 */
	private String name;

	/**
	 * User email.
	 */
	private String email;

	/**
	 * User website url.
	 */
	private String site;

	/**
	 * User description.
	 */
	private String description;

	/**
	 * user role (ADMIN,USER,GUEST).
	 */
	private Role role;

	/**
	 * last used ip adress.
	 */
	private String ipAdress;
	
	/**
	 * True if user wants to receive a mail when a comment is published on his Loops.
	 */
	private boolean mailComments;
	
	/**
	 * True if user wants to receive a mail when a new loop is published.
	 */
	private boolean mailLoops;

	/**
	 * Date of creation.
	 */
	private Date creationDate;

	/**
	 * Get accessor for lang.
	 * @return the lang to get
	 */
	public String getLang() {
		return lang;
	}

	/**
	 * Set accessor for lang.
	 * @param pLang the lang to set
	 */
	public void setLang(String pLang) {
		this.lang = pLang;
	}

	/**
	 * Get accessor for name.
	 * @return the name to get
	 */
	public String getName() {
		return name;
	}

	/**
	 * Set accessor for name.
	 * @param pName the name to set
	 */
	public void setName(String pName) {
		this.name = pName;
	}

	/**
	 * Get accessor for email.
	 * @return the email to get
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * Set accessor for email.
	 * @param pEmail the email to set
	 */
	public void setEmail(String pEmail) {
		this.email = pEmail;
	}

	/**
	 * Get accessor for site.
	 * @return the site to get
	 */
	public String getSite() {
		return site;
	}

	/**
	 * Set accessor for site.
	 * @param pSite the site to set
	 */
	public void setSite(String pSite) {
		this.site = pSite;
	}

	/**
	 * Get accessor for description.
	 * @return the description to get
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Set accessor for description.
	 * @param pDescription the description to set
	 */
	public void setDescription(String pDescription) {
		this.description = pDescription;
	}

	/**
	 * Get accessor for role.
	 * @return the role to get
	 */
	public Role getRole() {
		return role;
	}

	/**
	 * Set accessor for role.
	 * @param pRole the role to set
	 */
	public void setRole(Role pRole) {
		this.role = pRole;
	}

	/**
	 * Get accessor for ipAdress.
	 * @return the ipAdress to get
	 */
	public String getIpAdress() {
		return ipAdress;
	}

	/**
	 * Set accessor for ipAdress.
	 * @param pIpAdress the ipAdress to set
	 */
	public void setIpAdress(String pIpAdress) {
		this.ipAdress = pIpAdress;
	}

	/**
	 * Get accessor for mailComments.
	 * @return the mailComments to get
	 */
	public boolean isMailComments() {
		return mailComments;
	}

	/**
	 * Set accessor for mailComments.
	 * @param pMailComments the mailComments to set
	 */
	public void setMailComments(boolean pMailComments) {
		this.mailComments = pMailComments;
	}

	/**
	 * Get accessor for mailLoops.
	 * @return the mailLoops to get
	 */
	public boolean isMailLoops() {
		return mailLoops;
	}

	/**
	 * Set accessor for mailLoops.
	 * @param pMailLoops the mailLoops to set
	 */
	public void setMailLoops(boolean pMailLoops) {
		this.mailLoops = pMailLoops;
	}

	/**
	 * Get accessor for creationDate.
	 * @return the creationDate to get
	 */
	public Date getCreationDate() {
		return creationDate;
	}

	/**
	 * Set accessor for creationDate.
	 * @param pCreationDate the creationDate to set
	 */
	public void setCreationDate(Date pCreationDate) {
		this.creationDate = pCreationDate;
	}

	
}
